using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using FwProject.Authorization;
using FwProject.Authorization.Users;
using FwProject.Roles.Dto;
using FwProject.Users.Dto;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc;
using X.PagedList;

namespace FwProject.Users
{
    public interface IUserAppService : IAsyncCrudAppService<UserDto, long, PagedResultRequestDto, CreateUserDto, UserDto>
    {
        Task<ListResultDto<RoleDto>> GetRoles();

        /// <summary>
        /// 司机获取权限<see cref="PermissionNames" />
        /// </summary>
        /// <param name="PermissionNames"></param>
        /// <returns></returns>
        Task<bool> GetRoleByNamesPermission(string PermissionNames);
        /// <summary>
        /// 获取司机所有权限<see cref="PermissionNames" />
        /// </summary>
        /// <param name="PermissionNames"></param>
        /// <returns></returns>
        Task<IReadOnlyList<Permission>> GetRoleByAllPermission();


        Task ChangeLanguage(ChangeUserLanguageDto input);

        [HttpGet]
        Task<X.PagedList.IPagedList<UserDto>> GetPagedListAsync(int pageIdx, int pageSize, string factoryid, string type, string keyword);
        /// <summary>
        /// 返回当前对象
        /// </summary>
        /// <returns>The dto.</returns>
        Task<UserDto> GetDto();
        /// <summary>
        /// 修改用户姓名 单体参数只能用get方式不能用post
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        [HttpGet]
        Task EditUserName(long id, string name);

        /// <summary>
        /// 修改头像
        /// </summary>
        /// <param name="id"></param>
        /// <param name="face"></param>
        /// <returns></returns>
        Task EditFace(string face);

        Task<List<UserExportDto>> GetUserListAsync();
        /// <summary>
        /// huoqu
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<UserDto> GetByIdUserAsync(long id);

        Task<UserDto> GetUserByMobile(string Mobile);

        /// <summary>
        /// 创建用户信息并且获取Id
        /// </summary>
        /// <param name="input">用户实体</param>
        /// <returns>用户Id</returns>
        Task CreateAndGitIdAsync(CreateUserDto input);

        /// <summary>
        /// 修改用户基础信息
        /// </summary>
        /// <param name="id">用户Id</param>
        /// <param name="input">修改实体</param>
        /// <returns></returns>
        Task EditAsync(long id, UserEnterDto input);

        /// <summary>
        /// 获取输入实体
        /// </summary>
        /// <param name="id">用户Id</param>
        /// <returns></returns>
        Task<UserEnterDto> GetEnterEntityAsync(long id);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(long id);

        Task<List<UserOutputDto>> GetAllByTypeAsync(EmployeeType type, Guid? factoryinfoId, string keyword);

        Task<List<UserOutputDto>> GetAllListAsync(string keyword);

        Task<List<UserDto>> GetAllPersonAsync();

        Task<List<UserOutputDto>> GetAllAgentPeoperAsync();

        void UserPushMessage(List<long> ids, string Message);

    }
}
